<?php

/**
 * Description of Datapegawai
 *
 * @author DENY PRASETIA TW
 * http://denyprasetiatw.blogspot.com/
 * Created Feb 10, 2012 - 9:47:38 AM
 */

if($this->session->userdata('s_hakakses') != "1"){
    redirect();
} else if($this->session->userdata('s_hakakses') == NULL){
    redirect();
}

?>

<div align="center">
    
    <div align="center">
    <?php 
        echo form_open('Site/menu/Caripegawai');
        echo "Cari pegawai : ".form_input('i_namaPegawai')." ".form_submit('i_cari', ' Cari ');
        echo form_close(); 
    ?>
    </div>
    
    <br>
    
    <table border="1" cellpadding="5">
        <thead>
            <tr>
                <th><b>NIP</b></th>
                <th><b>NAMA</b></th>
                <th><b>PASSWORD</b></th>
                <th><b>HAKAKSES</b></th>
                <th><b>STATUS</b></th>
                <th><b>EDIT</b></th>
            </tr>
        </thead>
        <tbody>
        <?php foreach($daftarpegawai as $row){
         echo "<tr>";
            echo "<td>".$row->IDPEGAWAI."</td>";
            echo "<td>".$row->NAMAPEGAWAI."</td>";
            echo "<td>".$row->PASSWORD."</td>";
            echo "<td>".$row->HAKAKSES."</td>";
            echo "<td>".$row->STATUSPEGAWAI."</td>";
            echo "<td>".anchor('Site/validasiEditDataPegawai/'.$row->IDPEGAWAI,'Edit')."</td>";
         echo "</tr>";
        } ?>
        </tbody>
    </table>
    
</div>